1. Field of the Invention
The present invention relates to a video data recording apparatus, a video data recording method, a video data reproducing apparatus, a video data reproducing method, a video data recording and reproducing apparatus, and video data recording and reproducing method applicable for video data corresponding to for example MPEG2 (Moving Picture Experts Group Phase 2) standard.
2. Description of the Related Art
As exemplified with a digital VCR (Video Cassette Recorder), a data recording and reproducing apparatus that records a digital video signal to a record medium and that reproduces the digital video signal therefrom is known. Since the information amount of the digital video signal is large, it is compressed. As an example of an encoding process for compressing the data amount of moving picture data, inter frame motion compensation predictive encoding process is known. As such an encoding standard, the MPEG2 standard is known.
When picture data corresponding to the MPEG2 standard is recorded and reproduced, all an elementary stream (ES), a packetized elementary stream (PES), and a transport stream (TS) can be recorded and reproduced. The ES is a bit stream that an encoder outputs and that is composed of access units corresponding to video frames. The PES is a packetized ES. Each packet has a PES header. The TS is segmented with packets whose length is 188 bytes each. Data of the PES is divided into packets. Each packet contains a TS header.
MPEG data has a hierarchical structure. The highest layer of the hierarchy is a sequence layer. The sequence layer is followed by a GOP (Group Of Picture) layer, a picture layer, a slice layer, a macro block layer, and a block area. In the MPEG standard, data contained in each layer is defined. The block layer that is the lowest layer contains DCT coefficient data generated corresponding to the DCT (Discrete Cosine Transform) process. One macro block is composed of four blocks of a luminance signal and one or two blocks of a color difference signal. Thus, one macro block contains a total of six blocks or eight blocks of coefficient data. The coefficient data is encoded with a variable length code. Macro block mode data that represents a macro block type is added to a macro block that has been encoded with the variable length code.
When PEG data is recorded or reproduced by a digital VCR in the environment of a broadcasting station, it is advantageous to record and reproduce an ES rather than a TS because the delay becomes the minimum and the switching timing becomes clear. These features are very important for a VCR used in a broadcasting station. As an interface for an ES in the MPEG standard, SDTI-CP (Serial Data Transform Interface Content Package) interface can be used. There are following differences between an ES in the SDTI-CP format and a TS in the MPEG format.
In the SDTI-CP format:
Clock synchronization: H/V synchronous signal of SDI
Frame synchronization: Frame synchronous signal of SDI
Decode delay: one frame (two frames for END and DEC)
In the MPEG-TS format:
Clock synchronization: PCR
Frame synchronization: PTS/DTS of PES
Decode delay: Several frames (depending on vbv delay)
As is clear from the comparison, it is advantageous to use an TS in the case that a synchronous signal cannot be transmitted between two far points by another means. However, in a broadcasting station, all operations are performed using a single synchronous signal named house sync. Thus, a synchronous signal can be easily obtained. Consequently, it is not necessary to place a synchronous signal PCR (Program Clock Reference) on a stream. This applies to frame synchronization. A time reference termed time code is totally used in the broadcasting station. Thus, new time stamps such as PTS (Program Time Stamp) and DTS (Decoding Time Stamp) of a PES are not required.
More importantly, a transmission system that performs encoding/decoding processes with a small delay is required. In the case of the MPEG-TS, a vbv buffer (that the encoder estimates as the storage capacity of a buffer on a decoder side) is used to smooth the transmission rate. When the size of the buffer is large, the delay of the decoder becomes large.
On the other hand, in the SDTI-CP, with a sufficient transmission band, a stream (video data, audio data, additional data, and so forth) of one frame can be transmitted as bursts. Thus, since the frame is immediately preceded by a synchronous signal thereof, a switching operation can be performed on a transmission path for video data, audio data, additional data, and so forth. In addition, unlike with the MPEG-TS, it is not necessary to take a time for storing data to the vbv buffer. Thus, in the next frame, data can be decoded. Because of such a reason, it is preferred that a digital VCR used in a broadcasting station can input an ES, record it on a tape, and output data reproduced from a tape as an ES.
When an ES is recorded and reproduced by a VCR, because of the characteristics thereof, with the syntax of the MPEG standard, a problem takes place. In the MPEG2 standard, a variable length code is used. As a data synchronization detecting system for data, (1) preceded by (0) of 23 bits is used as a start code. The minimum unit of the lowest hierarchical layer is a slice. Normally, one slice is composed of one stripe (16 lines). With one stripe, a variable length code starts with the left edge of the screen and ends with the left edge thereof.
When an MPEG ES of which one slice is composed of one stripe is recorded on a tape by a VCR, the resistance against an error is weak. Even if one error takes place in the slice, the error propagates to the right edge of the screen. The error cannot be restored until the next slice header is detected. When a variable speed reproducing operation of which part of data is reproduced is performed, only a portion followed by a variable length code is reproduced. Thus, a reproduced portion concentrates at the left side of the screen. Consequently, the screen cannot be equally updated. In addition, when a high speed reproducing operation is performed, the arrangement of data on the tape cannot be predicted. Thus, when a tape pattern is traced at predetermined intervals, the screen cannot be equally updated.
Moreover, in the MPEG syntax, the maximum slice length (maximum macro block length) is not limited. Thus, data whose data amount becomes larger than the original video data is permitted. In this case, it takes a long time to perform a process for rearranging coefficients every macro block. Thus, since a buffer is required, a system delay becomes large.
In association with the rearranging process for coefficients every macro block, a packing process will be described. In a VCR, to simplify signal processes for the recording operation and the reproducing operation, a synchronous signal and an ID are added to data with a predetermined length so as to form sync blocks. A process for packing data in the data area of a sync block is referred to as packing process. The packing process is performed on the recording side. In contrast, a process for removing data from the data area of a sync block is referred to as depacking process. The depacking process is performed on the reproducing side. When a product code is used, data is packed in one line of an ECC (Error Correcting Code) block of the product code.
In a VCR, the amount of data that can be recorded every track or every a predetermined number of tracks is fixed. Thus, the data amount of a variable length code generated in a predetermined time period is controlled so that it does not exceed a predetermined value. Data encoded with a variable length code is packed in data areas of a plurality of sync blocks in a predetermined time period.
When variable length data of each macro block is packed, fixed portions (equivalent to data areas for sync blocks) corresponding to the number of macro blocks in a predetermined time period (for one frame as an edit unit) of which the data amount is selected are prepared. One variable length data portion is packed to one fixed portion. All macro blocks are packed from the beginning of each of the fixed portions. An overflow portion that cannot be packed to a fixed portion is successively packed to a blank area of other fixed portions. In this case, length information that represents the data length of variable length data of each macro block is added to the variable length data. When data is reproduced, with reference to the length information, variable length data is depacked.
When variable length data of a macro block is 4:2:2 video data, every eight DCT blocks, the variable length data is zigzag scanned in the order from DC coefficients (DC components) to AC coefficients (AC components). DC coefficients and low frequency AC coefficients of individual DC blocks disperse in variable length data of one macro block (one slice). To decode DCT blocks and restore a picture, these components are important elements. However, as mentioned above, due to an error that takes place in the reproducing operation of the VCR, DCT blocks may not be decoded in the middle of variable length data. Moreover, in the variable speed reproducing operation of the VCR, since data is partly reproduced, the depacking process cannot be performed. Thus, in consideration of an error propagation and a process in the variable speed reproducing operation, it is not preferred that DC coefficients and low frequency AC coefficients disperse.
In the MPEG standard, video data has a hierarchical structure of six layers that are a sequence layer, a GOP layer, a picture layer, a slice layer, a macro block layer, and a block layer. In addition, a multiplexing process is performed in each hierarchical level. The multiplexing process is defined as a syntax of the MPEG standard. Other than picture data, header information such as a PES (Packetized Elementary Stream) header, a sequence header, a GOP header, and a slice header is multiplexed. The header information is important for performing a process such as a decoding process for picture data. When an ES of the MPEG standard is recorded and reproduced, in addition to picture data, it is necessary to record and reproduce the header information, respectively. As one method for recording and reproducing the header information, the minimum data that is sufficient and necessity for reproducing header information is recorded and reproduced, respectively.
However, sometimes, it may be difficult to treat the data amount of the header information as fixed length data. Firstly, there are many types of video data formats and the data amount of header information varies in each format. For example, there are 18 video formats in America digital television broadcasts. Secondly, video index data and ancillary data multiplexed on a particular line (the ancillary data are for example a closed caption, a teletext, and a time code of vertical blanking interval (VITC)) are transmitted as a video ES. Thus, when they are inserted into a user data area of a picture header, the data amount of the user data area fluctuates.
Thus, to record variable length data that is not video data (such as header information, a video index, and ancillary data), a record area should be assigned considering a relevant record picture format. In addition, it is necessary to allocate a record area that can record the maximum amount of data that will take place.
When the number of video formats is only one or two, since the variation of the data amount is relatively small, it is not difficult to allocate record areas for non-video data on a tape corresponding to the individual video formats. However, when there are many video formats, since the variation of the data amount of non-video data may become large or may not be predictable, it is difficult to allocate record areas for non-video data on a tape. In contrast, when record areas that can record the maximum amount of data that may take place are allocated, if the data amount is small, a loss area takes place on the tape. Thus, the record storage amount of the tape cannot be effectively used.
In a digital VCR that can record and reproduce an MPEG ES, it is necessary to convert the ES into a stream suitable for the VCR (this stream is referred to as device stream). In other words, a slice structure of which one slice is equal to one macro block should be used. In addition, variable length data should be rearranged so that DC coefficients and AC coefficients are successively arranged in the order of DC coefficients and lower AC coefficients. Thus, an influence of an error can be suppressed. In addition, the picture quality in the variable speed reproducing operation can be improved. However, non-video data that is variable length data with a relatively large data amount should be recorded and/or reproduced.
Thus, an object of the present invention is to provide a video data recording apparatus, a video data recording method, a video data reproducing apparatus, a video data reproducing method, a video data recording and reproducing apparatus, and a video data recording and reproducing method that allow data as an ES to be interfaced outside the apparatus and the ES to be converted into a device stream suitable for a process of a VCR.
A first aspect of the present invention is a video data recording apparatus for recording video data to a record medium, comprising a receiving means for receiving an elementary stream from the outside of the apparatus, the elementary stream having a hierarchical structure of a block layer, a macro block layer, a slice layer, a picture layer, a GOP layer, and a sequence layer, the block layer being composed of variable length data of which one screen of video data is divided into a plurality of blocks, data of each block is orthogonally transformed and thereby coefficient data is generated, the coefficient data being encoded with a variable length code, the macro block layer being composed of a plurality of blocks that are spatially adjacent, the slice layer being composed of at least one macro block, the picture layer being composed of at least one slice, the GOP layer being composed of at least one picture, the sequence layer being composed of at least one GOP, a recording side stream converting means for converting the elementary stream that is output from the receiving means into a device stream that is a data stream suitable for the record medium, a record processing means for performing a process for recording the device stream to the record medium and forming record data, and a recording means for recording the record data received from the record processing means to the record medium.
Thus, an elementary stream having a hierarchical structure is converted into a device stream suitable for a record medium. The device stream is recorded to the record medium.
A second aspect of the present invention is a video data reproducing apparatus for reproducing video data from a record medium, record data being recorded on the record medium in such a manner that an elementary stream is converted into a device stream that is a data stream suitable for the record medium, the elementary stream having a hierarchical structure of a block layer, a macro block layer, a slice layer, a picture layer, a GOP layer, and a sequence layer, the block layer being composed of variable length data of which one screen of video data is divided into a plurality of blocks, data of each block is orthogonally transformed and thereby coefficient data is generated, the coefficient data being encoded with a variable length code, the macro block layer being composed of a plurality of blocks that are spatially adjacent, the slice layer being composed of at least one macro block, the picture layer being composed of at least one slice, the GOP layer being composed of at least one picture, the sequence layer being composed of at least one GOP, the apparatus comprising a reproducing means for reproducing the record data from the record medium, a reproduction processing means for processing the record data that is output from the reproducing means and restoring the device stream, a reproducing side stream converting means for converting the restored device stream into the elementary stream, and a transmitting means for outputting the elementary stream that is output from the reproducing side stream converting means to the outside of the apparatus.
Thus, an elementary stream having a hierarchical structure is reproduced from a record medium on which a device stream converted from the elementary stream has been recorded.
A third aspect of the present invention is a video data recording and reproducing apparatus for recording video data to a record medium and reproducing video data from the record medium, comprising a receiving means for receiving an elementary stream from the outside of the apparatus, the elementary stream having a hierarchical structure of a block layer, a macro block layer, a slice layer, a picture layer, a GOP layer, and a sequence layer, the block layer being composed of variable length data of which one screen of video data is divided into a plurality of blocks, data of each block is orthogonally transformed and thereby coefficient data is generated, the coefficient data being encoded with a variable length code, the macro block layer being composed of a plurality of blocks that are spatially adjacent, the slice layer being composed of at least one macro block, the picture layer being composed of at least one slice, the GOP layer being composed of at least one picture, the sequence layer being composed of at least one GOP, a recording side stream converting means for converting the elementary stream that is output from the receiving means into a device stream that is a data stream suitable for the record medium, a record processing means for performing a process for recording the device stream to the record medium and forming record data, a recording means for recording the record data received from the record processing means to the record medium, reproducing means for reproducing the record data from the record medium, a reproduction processing means for processing the record data that is output from the reproducing means and restoring the device stream, a reproducing side stream converting means for converting the restored device stream to the elementary stream, and a transmitting means for outputting the elementary stream that is output from the reproducing side stream converting means to the outside of the apparatus.
Thus, an elementary stream having a hierarchical structure is converted into a device stream suitable for a record medium. The device stream is recorded to the record medium. In addition, the elementary stream is reproduced from the record medium.
A fourth aspect of the present invention is a video data recording method for recording video data to a record medium, comprising the steps of (a) receiving an elementary stream from the outside, the elementary stream having a hierarchical structure of a block layer, a macro block layer, a slice layer, a picture layer, a GOP layer, and a sequence layer, the block layer being composed of variable length data of which one screen of video data is divided into a plurality of blocks, data of each block is orthogonally transformed and thereby coefficient data is generated, the coefficient data being encoded with a variable length code, the macro block layer being composed of a plurality of blocks that are spatially adjacent, the slice layer being composed of at least one macro block, the picture layer being composed of at least one slice, the GOP layer being composed of at least one picture, the sequence layer being composed of at least one GOP, (b) converting the elementary stream obtained at step (a) into a device stream that is a data stream suitable for the record medium, (c) performing a process for recording the device stream to the record medium and forming record data, and (d) recording the record obtained at step (c) to the record medium.
Thus, an elementary stream having a hierarchical structure is converted into a device stream suitable for a record medium. The device stream is recorded to the record medium.
A fifth aspect of the present invention is a video data reproducing method for reproducing video data from a record medium, record data being recorded on the record medium in such a manner that an elementary stream is converted into a device stream that is a data stream suitable for the record medium, the elementary stream having a hierarchical structure of a block layer, a macro block layer, a slice layer, a picture layer, a GOP layer, and a sequence layer, the block layer being composed of variable length data of which one screen of video data is divided into a plurality of blocks, data of each block is orthogonally transformed and thereby coefficient data is generated, the coefficient data being encoded with a variable length code, the macro block layer being composed of a plurality of blocks that are spatially adjacent, the slice layer being composed of at least one macro block, the picture layer being composed of at least one slice, the GOP layer being composed of at least one picture, the sequence layer being composed of at least one GOP, the method comprising the steps of (a) reproducing the record data from the record medium, (b) processing the record data obtained at step (a) and restoring the device stream, (c) converting the restored device stream into the elementary stream, and (d) outputting the elementary stream obtained at step (c) to the outside.
Thus, an elementary stream having a hierarchical structure is reproduced from a record medium on which a device stream converted from the elementary stream has been recorded.
A sixth aspect of the present invention is a video data recording and reproducing method for recording video data to a record medium and reproducing video data from the record medium, comprising the steps of (a) receiving an elementary stream from the outside, the elementary stream having a hierarchical structure of a block layer, a macro block layer, a slice layer, a picture layer, a GOP layer, and a sequence layer, the block layer being composed of variable length data of which one screen of video data is divided into a plurality of blocks, data of each block is orthogonally transformed and thereby coefficient data is generated, the coefficient data being encoded with a variable length code, the macro block layer being composed of a plurality of blocks that are spatially adjacent, the slice layer being composed of at least one macro block, the picture layer being composed of at least one slice, the GOP layer being composed of at least one picture, the sequence layer being composed of at least one GOP, (b) converting the elementary stream obtained at step (a) into a device stream that is a data stream suitable for the record medium, (c) performing a process for recording the device stream to the record medium and forming record data, (d) recording the record data obtained at step (c) to the record medium, (e) reproducing the record data from the record medium, (f) processing the record data obtained at step (e) and restoring the device stream, (g) converting the restored device stream to the elementary stream, and (h) outputting the elementary stream obtained at step (g) to the outside.
Thus, an elementary stream having a hierarchical structure is converted into a device stream suitable for a record medium. The device stream is recorded to the record medium. In addition, the elementary stream is reproduced from the record medium.